package gis.lifay.sdk;

/**
 *@ClassName HdfException
 *@Description HDF异常类
 *@Author lifay
 *@Date 2021/11/1 11:30
 **/
public class HdfException extends RuntimeException {

    private static final String HDFFILE_NOT_FIND = "HDFFILE_NOT_FIND";//文件不存在
    private static final String HDFFILE_NOT_INIT = "HDFFILE_NOT_INIT";//未初始化文件
    private static final String HDFFILE_NOT_VAILD = "HDFFILE_NOT_VAILD";//HDF格式校验不对
    private static final String HDFFILE_DATA_CHECK = "HDFFILE_DATA_CHECK";//数据校验不对

    /** Constructs a new runtime exception with the specified detail message.
     * The cause is not initialized, and may subsequently be initialized by a
     * call to {@link #initCause}.
     *
     * @param   message   the detail message. The detail message is saved for
     *          later retrieval by the {@link #getMessage()} method.
     */
    public HdfException(String message) {
        super(message);
    }

    public static HdfException HDFFILE_NOT_FIND() {
        return new HdfException(HDFFILE_NOT_FIND);
    }

    public static HdfException HDFFILE_NOT_VAILD() {
        return new HdfException(HDFFILE_NOT_VAILD);
    }

    public static HdfException HDFFILE_NOT_INIT() {
        return new HdfException(HDFFILE_NOT_INIT);
    }

    public static HdfException HDFFILE_DATA_CHECK() {
        return new HdfException(HDFFILE_DATA_CHECK);
    }
}
